﻿using System;

namespace Modbus
{
	/// <summary>
	/// 
	/// </summary>
	public abstract class ModbusReader
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="count"></param>
		/// <returns></returns>
		public abstract byte[] ReadBytes(int count);

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public abstract byte ReadByte();

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		[CLSCompliant(false)]
		public virtual sbyte ReadSByte()
		{
			return (sbyte)(this.ReadByte());
		}

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public abstract short ReadInt16();

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		[CLSCompliant(false)]
		public virtual ushort ReadUInt16()
		{
			return (ushort)(this.ReadInt16());
		}
	}
}
